﻿using AutoMapper;
using B.S.BaseData.Domain;
using B.S.BaseData.Domain.Entities.Logs;
using B.S.BaseData.Domain.Entities.Meeting;
using B.S.BaseData.Domain.Entities.RBAC;
using B.S.BaseData.ErrorCode;
using B.S.BaseData.ReadAPI.Dtos.Users;
using B.S.DataBase.EFCoreServiers.Dtos.Depts;
using B.S.DataBase.EFCoreServiers.Dtos.Logs;
using B.S.DataBase.EFCoreServiers.Dtos.MeetingApprovals;
using B.S.DataBase.EFCoreServiers.Dtos.MeetingReservations;
using B.S.DataBase.EFCoreServiers.Dtos.Meetings;
using B.S.DataBase.EFCoreServiers.Dtos.Permissions;
using B.S.DataBase.EFCoreServiers.Dtos.Roles;
using B.S.DataBase.EFCoreServiers.IServices.Users;
namespace B.S.BaseData.ReadAPI.Utils
{
    public class MapperProFiles : Profile
    {
        public MapperProFiles()
        {
            CreateMap<LoginResponseDto, User>().ReverseMap();


            CreateMap<GetUserReponseDto, User>().ReverseMap();
            CreateMap<GetUserReponseDtos, User>().ReverseMap();
            // CreateMap<Role, GetRoleResponseDto>().ReverseMap();
            CreateMap<Role, GetRoleResponseDto>().ReverseMap();
            CreateMap<ApiPaging<Role>, ApiPaging<GetRoleResponseDto>>().ReverseMap();

            CreateMap<Department, GetDepartmentResponseDto>().ReverseMap();
            CreateMap<ApiPaging<Department>, ApiPaging<GetDepartmentResponseDto>>().ReverseMap();

            CreateMap<Permission, GetAllPermissiontDto>().ReverseMap();

            CreateMap<MeetingRoom, GetMeetingRoomResponseDto>().ReverseMap();
            CreateMap<ApiPaging<MeetingRoom>, ApiPaging<GetMeetingRoomResponseDto>>().ReverseMap();

            CreateMap<GetMeetingReservationResponseDto, MeetingReservation>().ReverseMap();
            CreateMap<ApiPaging<GetMeetingReservationResponseDto>, ApiPaging<MeetingReservation>>().ReverseMap();

            CreateMap<List<GetMeetingApprovalResponseDto>, GetMeetingApprovalResponseDto>().ReverseMap();

            // CreateMap<User, GetUserReponseDto>();

            CreateMap<GetOperationLogResponseDto, OperationLog>().ReverseMap();
            CreateMap<ApiPaging<GetOperationLogResponseDto>, ApiPaging<OperationLog>>().ReverseMap();

        }
    }
}
